<!DOCTYPE html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>显示供应商明细</title>
    <link rel="stylesheet" href="<%=basePath %>web/themes/icon.css">
    <link rel="stylesheet" href="<%=basePath %>web/themes/default/easyui.css">
    <link rel="stylesheet" href="<%=basePath %>web/css/wu.css">
	<script src="<%=basePath %>web/js/jquery.min.js"></script>
    <script src="<%=basePath %>web/js/jquery.easyui.min.js"></script>
    <script src="<%=basePath %>web/js/easyui-lang-zh_CN.js"></script>
    <script>
    $(function(){
    	  var path=$("#path").val();
           var p=${cdList.province }-1;
		    //查询所有城市
             $.ajax({
				type:"post",//请求类型
				url:path+"company/getAreaByPid", 
				dataType:"json",//ajax接口（请求url）返回的数据类型
				success:function(data){//data：返回数据（json对象）
				   for(var i=0;i<data.length;i++){
				    if(p==i){
				   	 $("#province").append("<option value='"+data[i].areaId+"' selected='selected'>"+data[i].areaName+"</option>")
				    }else{
				   		$("#province").append("<option value='"+data[i].areaId+"'>"+data[i].areaName+"</option>")
				    }
				   }
				}
		    });
    })
     function loadClose(){
        	parent.closeTabs('查看往来单位')
        }    
    </script>
    <style>
       body {
            font-size:12px;
            padding:10px
        }
        .l-table-edit {
          border-collapse:collapse;
          border-spacing:0;
        }
        .l-table-edit-td {
            padding:4px;
            font-size:12px;
            border:1px solid #84a0c4 
        }
        
        
    </style>


</head>
<body>
<form name="form"  id="form" action="" method="post">
    <table cellpadding="0" cellspacing="0" class="l-table-edit" style="width:100%;" border="1">
        <tr >
            <td width="17%"  align="right" class="l-table-edit-td"><span style="color: red;">*</span>单位代码：</td>
            <td width="27%" align="left" class="l-table-edit-td">
           	    <input  type="text" class="easyui-textbox" id="code" value="${cdList.code }" name="code" maxlength="100" ltype="text" style="height:20px;width:200px" disabled="disabled"/>
            </td>
            <td width="13%"  align="right" class="l-table-edit-td">操作日期：</td>
            <td width="43%" align="left" class="l-table-edit-td">
            <input  type="text" name="date" id="date" value="<fmt:formatDate value="${cdList.date}" pattern="yyyy-MM-dd HH:mm:ss"/>" maxlength="30" class="easyui-datetimebox" style="height:20px;width:200px" disabled="disabled" />
            </td>
        </tr>
        <tr>
            <td width="17%" align="right" class="l-table-edit-td"><span style="color: red;">*</span>供应商名：</td>
            <td align="left" class="l-table-edit-td" width="27%">
                <input type="text" id="name" name="name" value="${cdList.name }" class="easyui-textbox"  maxlength="100" ltype="text"  style="height:20px;width:200px" disabled="disabled"/>
            </td>
            <td width="13%" align="right" class="l-table-edit-td">联系人员：</td>
            <td align="left" class="l-table-edit-td" width="43%">
                <input name="linkman" type="text" id="linkman" value="${cdList.linkman }" class="easyui-textbox" maxlength="30" ltype="text" style="height:20px;width:200px" disabled="disabled"/>
            </td>
        </tr>
        <tr>
            <td width="17%" align="right" class="l-table-edit-td">固定电话：</td>
            <td width="27%" align="left" class="l-table-edit-td"><input  type="text" id="telephone"class="easyui-textbox" value="${cdList.telephone }" name="telephone" maxlength="50" ltype="text" style="height:20px;width:200px"disabled="disabled"/></td>
            <td width="13%" align="right" class="l-table-edit-td">手机：</td>
            <td width="43%" align="left" class="l-table-edit-td"><input type="text" name="phone" id="phone" class="easyui-textbox" value="${cdList.phone }" maxlength="50"  ltype="text" style="height:20px;width:200px"disabled="disabled"/></td>
        </tr>
        <tr>
            <td width="17%" align="right" class="l-table-edit-td">传真：</td>
            <td width="27%" align="left" class="l-table-edit-td">
               <input type="text" id="fax" name="fax" value="${cdList.fax }" class="easyui-textbox"  maxlength="100" ltype="text"  style="height:20px;width:200px"disabled="disabled"/>
            </td>
           
            <td width="13%" align="right" class="l-table-edit-td">邮箱：</td>
            <td width="43%"align="left" class="l-table-edit-td"><input type="text" name="email" class="easyui-textbox"  id="email" value="${cdList.email }" maxlength="50"  ltype="text" style="height:20px;width:200px" disabled="disabled"/></td>
        </tr>
        <tr>
            <td width="17%" align="right" class="l-table-edit-td">省市：</td>
            <td width="27%" align="left" class="l-table-edit-td">
            	<select name="province" id="province" disabled="disabled">
            		<option value="n">选择地区</option>
            		<option selected="selected">${cdList.province }</option>
            	</select>
            	<select name="city" id="city" disabled="disabled">
            		<option>选择地区</option>
            		 <c:forEach items="${cityList}" var="city">
            			<option  value="${city.areaId }" 
            			<c:if test="${city.areaId == cdList.city }">selected="selected"</c:if>
            			>${city.areaName }</option>
            		</c:forEach> 
            	</select>
            </td>
            <td width="13%" align="right" class="l-table-edit-td">网址：</td>
            <td width="43%"align="left" class="l-table-edit-td"><input type="text" name="website" class="easyui-textbox"  id="website" value="${cdList.website }" maxlength="50"  ltype="text" style="height:20px;width:200px" disabled="disabled"/></td>
        </tr>
        <tr>
            <td width="17%" align="right" class="l-table-edit-td">地 址：</td>
            <td width="27%" align="left" class="l-table-edit-td">
               <input type="text" id="address" name="address" value="${cdList.address }" class="easyui-textbox"  maxlength="100" ltype="text"  style="height:20px;width:200px" disabled="disabled"/>
            </td>
           
            <td width="13%" align="right" class="l-table-edit-td">qq：</td>
            <td width="43%"align="left" class="l-table-edit-td"><input type="text" name="qq" class="easyui-textbox"  id="qq" value="${cdList.qq }" maxlength="50"  ltype="text" style="height:20px;width:200px" disabled="disabled"/></td>
        </tr>
        <tr>
            <td width="17%" align="right" class="l-table-edit-td">邮编：</td>
            <td width="27%" align="left" class="l-table-edit-td">
               <input type="text" id="zipcode" name="zipcode" value="${cdList.zipcode }" class="easyui-textbox"  maxlength="100" ltype="text"  style="height:20px;width:200px" disabled="disabled"/>
            </td>
           
            <td width="13%" align="right" class="l-table-edit-td">MSN：</td>
            <td width="43%"align="left" class="l-table-edit-td"><input type="text" name="msn" class="easyui-textbox"  id="msn" value="${cdList.msn }" maxlength="50"  ltype="text" style="height:20px;width:200px" disabled="disabled"/></td>
        </tr>
        <tr>
            <td width="17%" align="right" class="l-table-edit-td">开户账号：</td>
            <td width="27%" align="left" class="l-table-edit-td">
               <input type="text" id="account" name="account" value="${cdList.account }" class="easyui-textbox"  maxlength="100" ltype="text"  style="height:20px;width:200px" disabled="disabled"/>
            </td>
           
            <td width="13%" align="right" class="l-table-edit-td">阿里旺旺：</td>
            <td width="43%"align="left" class="l-table-edit-td"><input type="text" name="ali" class="easyui-textbox"  id="ali" value="${cdList.ali }" maxlength="50"  ltype="text" style="height:20px;width:200px" disabled="disabled"/></td>
        </tr>
        <tr>
            <td width="17%" align="right" class="l-table-edit-td">银行：</td>
            <td width="27%" align="left" class="l-table-edit-td">
               <input type="text" id="bank" name="bank" value="${cdList.bank }" class="easyui-textbox"  maxlength="100" ltype="text"  style="height:20px;width:200px"disabled="disabled"/>
            </td>
           
            <td width="13%" align="right" class="l-table-edit-td">法人代表：</td>
            <td width="43%"align="left" class="l-table-edit-td"><input type="text" name="legalperson" class="easyui-textbox"  id="legalperson" value="${cdList.legalperson }" maxlength="50"  ltype="text" style="height:20px;width:200px" disabled="disabled"/></td>
        </tr>
        <tr>
            <td width="17%" align="right" class="l-table-edit-td">税号：</td>
            <td width="27%" align="left" class="l-table-edit-td">
               <input type="text" id="tax" name="tax" value="${cdList.tax }" class="easyui-textbox"  maxlength="100" ltype="text"  style="height:20px;width:200px" disabled="disabled"/>
            </td>
           
            <td width="13%" align="right" class="l-table-edit-td">委托代理：</td>
            <td width="43%"align="left" class="l-table-edit-td"><input type="text" name="agent" class="easyui-textbox"  id="agent" value="${cdList.agent }" maxlength="50"  ltype="text" style="height:20px;width:200px" disabled="disabled"/></td>
        </tr>
        <tr>
            <td width="17%" align="right" class="l-table-edit-td">类别：</td>
            <td width="27%" align="left" class="l-table-edit-td">
            <c:if test="${cdList.type==1 }">
               <input type="radio"  name="type" value="1"  maxlength="100" ltype="text"  disabled="disabled" checked="checked"/>客户
               <input type="radio"  name="type" value="2"  maxlength="100" ltype="text"  disabled="disabled"/>供应商
               <input type="radio"  name="type" value="3"   maxlength="100" ltype="text" disabled="disabled"/>客户/供应商
            </c:if>
            <c:if test="${cdList.type==2 }">
               <input type="radio"  name="type" value="1"  maxlength="100" ltype="text"  disabled="disabled" />客户
               <input type="radio"  name="type" value="2"  maxlength="100" ltype="text"  disabled="disabled" checked="checked"/>供应商
               <input type="radio"  name="type" value="3"   maxlength="100" ltype="text" disabled="disabled"/>客户/供应商
            </c:if>
            <c:if test="${cdList.type==3 }">
               <input type="radio"  name="type" value="1"  maxlength="100" ltype="text"  disabled="disabled" />客户
               <input type="radio"  name="type" value="2"  maxlength="100" ltype="text"  disabled="disabled"/>供应商
               <input type="radio"  name="type" value="3"   maxlength="100" ltype="text" disabled="disabled" checked="checked"/>客户/供应商
            </c:if>
            </td>
            <td width="13%" align="right" class="l-table-edit-td">状态：</td>
            <td width="43%"align="left" class="l-table-edit-td">
            <c:choose>
	            <c:when test="${cdList.state==1 }">
	            	<input type="radio" name="state"  value="1" maxlength="50"  ltype="text" disabled="disabled" checked="checked"/>显示
	            	<input type="radio" name="state"  value="2" maxlength="50"  ltype="text" disabled="disabled"/>隐藏
	            </c:when>
	            <c:otherwise>
	            	<input type="radio" name="state"  value="1" maxlength="50"  ltype="text" disabled="disabled"/>显示
	            	<input type="radio" name="state"  value="2" maxlength="50"  ltype="text" disabled="disabled" checked="checked"/>隐藏
	            </c:otherwise>
            </c:choose>
            </td>
        </tr>
        <tr>
        	<td width="17%" align="right" class="l-table-edit-td">备注：</td>
            <td width="27%" align="left" class="l-table-edit-td" colspan="3">
               <input type="text" id="memo" name="memo" value="${cdList.memo }" class="easyui-textbox"  maxlength="100" ltype="text"  style="height:20px;width:655px" disabled="disabled"/>
            </td>
        </tr>
    </table>
</form>
<br>
<input type="hidden" id="path" value="<%=basePath%>"/>
<input  type="button" value="新   增" style="width:60px" onclick="reloads()" disabled="disabled">
<input  type="button" value="保存" style="width:60px" id="save"disabled="disabled">
<input  type="button" value="打印" style="width:60px" id="save">
<a href="javascript:loadClose()"><input  type="button" value="关闭" style="width:60px"></a>
<br/><br/>

</body>
</html>